Skip to content

PDFCLOUD-5552 Add client methods to import and export PDF form data#17

Merged
datalogics-kam merged 8 commits intopdfrest:mainfrom
datalogics-cgreen:pdfcloud-5464-form-data
Feb 18, 2026
Merged

PDFCLOUD-5552 Add client methods to import and export PDF form data#17
datalogics-kam merged 8 commits intopdfrest:mainfrom
datalogics-cgreen:pdfcloud-5464-form-data

Conversation

@datalogics-cgreen
Copy link
Copy Markdown
Contributor

@datalogics-cgreen datalogics-cgreen commented Jan 20, 2026

Adds import/export form data endpoints to sync + async clients, wiring to /pdf-with-imported-form-data and /exported-form-data with validated payloads and output naming support.

Introduces ExportDataFormat and internal payload models to enforce allowed MIME types and data formats for form-data workflows.

Adds unit + live coverage for both endpoints (success paths, request customization, validation errors, and async flows), plus a form-data XML fixture

@datalogics-gwalczak datalogics-gwalczak changed the title Pdfcloud 5464 form data PDFCLOUD-5464 form data Jan 21, 2026
@datalogics-cgreen datalogics-cgreen changed the title PDFCLOUD-5464 form data PDFCLOUD-5552 Add client methods to import and export PDF form data Jan 30, 2026
@datalogics-cgreen datalogics-cgreen marked this pull request as ready for review February 12, 2026 00:02
Copy link
Copy Markdown
Contributor

@datalogics-kam datalogics-kam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locally run Codex PR Review Auditor had these findings; please remediate.

Also, should the live testing use more form types for input?

And make sure that all cases of exporting forms are enumerated.

  1. [P1] export_form_data accepts xdp/xfd locally even though the live API rejects those for PDF inputs.
    Evidence:
  • Local type allows them: /Users/kam/src/dl/pdfrest-python/src/pdfrest/types/public.py:131
  • Payload enforces only that literal type (no PDF-specific format guard): /Users/kam/src/dl/pdfrest-python/src/pdfrest/models/_internal.py:1030
  • Live test explicitly expects server failure for xdp: /Users/kam/src/dl/pdfrest-python/tests/live/test_live_export_form_data.py:75
    Risk: callers get avoidable runtime PdfRestApiError instead of local validation feedback.
  1. [P2] Live export coverage is incomplete for strict literal/transport parity policy.
    Evidence:
  • Sync success only parameterizes xml + xfdf: /Users/kam/src/dl/pdfrest-python/tests/live/test_live_export_form_data.py:24
  • Async success tests only xml: /Users/kam/src/dl/pdfrest-python/tests/live/test_live_export_form_data.py:54
  • Public literal includes fdf, xfdf, xml, xdp, xfd: /Users/kam/src/dl/pdfrest-python/src/pdfrest/types/public.py:131
    Risk: transport-specific regressions for untested literals can slip through.
  1. [P3] Live success assertions don’t fully validate response attributes (type/size/warning) per testing guidance.
    Evidence:
  • Export live tests assert name/input only: /Users/kam/src/dl/pdfrest-python/tests/live/test_live_export_form_data.py:47
  • Import live tests assert name/type/input IDs but not size/warning: /Users/kam/src/dl/pdfrest-python/tests/live/test_live_import_form_data.py:65
    Risk: weaker signal for API-side behavior changes.
  1. [P3] Commit messages are not consistently in area: summary form.
    Evidence from commit log in reviewed range:
  • Add Import Form Data tool
  • Test Import Form Data tool
  • Add Export Form Data tool
  • Test Export Form Data

@datalogics-gwalczak
Copy link
Copy Markdown
Contributor

Chris updates based on recommendations, Kevin merges.

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 18, 2026

Deploy Preview for pdfrest-python ready!

Name Link
🔨 Latest commit 67cc64e
🔍 Latest deploy log https://app.netlify.com/projects/pdfrest-python/deploys/69961b02ffde840008dc4af4
😎 Deploy Preview https://deploy-preview-17--pdfrest-python.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@datalogics-kam datalogics-kam merged commit 63203d6 into pdfrest:main Feb 18, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants